import request from '@/utils/request'

// 查询寿命预测结果列表
export function listResult(query) {
  return request({
    url: '/bearing/result/list',
    method: 'get',
    params: query
  })
}

// 查询寿命预测结果详细
export function getResult(id) {
  return request({
    url: '/bearing/result/' + id,
    method: 'get'
  })
}

// 查询元器件类型
export function getyqjList() {
  return request({
    url: '/bearing/zxyc/getyqjList',
    method: 'get'
  })
}
// 查询工况类型
export function getgkList() {
  return request({
    url: '/bearing/zxyc/getgkList',
    method: 'get'
  })
}
// 新增寿命预测结果
export function addResult(data) {
  return request({
    url: '/bearing/result',
    method: 'post',
    data: data
  })
}

// 修改寿命预测结果
export function updateResult(data) {
  return request({
    url: '/bearing/result',
    method: 'put',
    data: data
  })
}

// 删除寿命预测结果
export function delResult(id) {
  return request({
    url: '/bearing/result/' + id,
    method: 'delete'
  })
}
